<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
function Animal(name, color){
    this.name = name;
    this.color = color;
}
Animal.prototype.eat = function (){
    console.log("动物在吃");
}

function Dog(name, color, weight){
    Animal.call(this, name, color)
    this.weight = weight;
}

var dog = new Dog("啊黄", "黑色", 10)

console.log(dog instanceof Animal);
</script>
</body>
</html>